//
//  GetPictureFromDevice.h
//  WDFans
//
//  Created by Zhihong Yuan on 2/16/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef enum {
    kAllType,
    kPhotoType,
    kMovieType
}FileType;

@protocol GetPictureFromDeviceDelegate;

@interface GetPictureFromDevice : NSObject
<UINavigationControllerDelegate, UIImagePickerControllerDelegate>
{
    NSData *fileData_;
    FileType fileType_;
    NSString *fileName_;
    id<GetPictureFromDeviceDelegate> delegate_;
}

@property (nonatomic, retain) NSData *fileData;
@property (nonatomic, assign) FileType fileType;
@property (nonatomic, retain) NSString *fileName;
@property (nonatomic, assign) id<GetPictureFromDeviceDelegate> delegate;
@property (nonatomic, assign) id parentController;

- (id)initWithParentViewController:(id)pc;
- (void)takePhotoWithCamera;
- (void)getPhotoFromLibrary;
@end

@protocol GetPictureFromDeviceDelegate <NSObject>

- (void)didGetFileWithData:(NSData *)data andName:(NSString *)name;
- (void)didGetFileFailedWithMessage:(NSString *)mes;
@end